package com.industry.framework.core.exception;

import lombok.Data;

import java.io.Serial;

/**
 * @Author nbZhuozh
 * @Date 2025-03-19  14:58
 **/

@Data
public class CoreGenericException extends RuntimeException{
    private int code;

    public CoreGenericException(int code, String message) {
        super(message);
        this.code = code;
    }

    public CoreGenericException(String s) {
        super(s);
        this.code = GlobalCoreExceptionConst.genericErrorException;
    }

    // Getter
    public int getCode() {
        return code;
    }

}
